
using DslFactory.Utilities.DteCodeModel;
namespace Dslfactory.wcfLanguage
{
 public partial class FieldOrProperty
 {
  /// <summary>
  /// Computes the label from type name, and name
  /// </summary>
  /// <returns></returns>
  internal string GetLabelValue()
  {
   return VariableLabel.ComputeLabel(KnownCodeTypes.FromStore(Store), MemberFullTypeName, Name);
  }


  /// <summary>
  /// Parses the label
  /// </summary>
  /// <param name="newValue"></param>
  internal void SetLabelValue(string newValue)
  {
   string name;
   string type = string.Empty;
   VariableLabel.ParseLabel(KnownCodeTypes.FromStore(Store), newValue, out name, ref type);
   Name = name;
   MemberFullTypeName = type;
  }

 }
}
